<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
        {% block html_title %} 游戏数据后台 {% endblock html_title %}
    </title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="{{ url_for('static', filename='vendor/bootstrap/css/bootstrap.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='vendor/font-awesome/css/font-awesome.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='vendor/Ionicons/css/ionicons.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/AdminLTE.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/skins/_all-skins.min.css') }}">
    <link href="https://cdn.bootcss.com/element-ui/2.0.5/theme-chalk/index.css" rel="stylesheet">
</head>
<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <header class="main-header">
            <!-- Logo -->
            <a href="{{ url_for('manager.gamesets') }}" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>文章</b>记录</span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>文章</b>记录</span>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top">
                <!-- Sidebar toggle button-->
                <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
                <!-- Navbar Right Menu -->
                <div style="overflow: hidden">
                    {% if current_user.is_authenticated %}
                    <a style="display: block;float: right;z-index: 999;color: white;line-height:50px;margin-right:10px" href="{{  url_for('auth.logout') }}">退出系统</a> {% endif %}
                </div>
            </nav>
        </header>
        <!-- Left side column. contains the logo and sidebar -->
        <aside class="main-sidebar">
            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">
                <!-- sidebar menu: : style can be found in sidebar.less -->
                <ul class="sidebar-menu" data-widget="tree">
                    <li class="header">菜单</li>
                <li {% if page=='players' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.players') }}">
            <i class="fa fa-dashboard"></i> <span>会员</span>
          </a>
                    </li>
                    <li {% if page=='gamesets' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.gamesets') }}">
            <i class="fa fa-dashboard"></i> <span>局数记录</span>
          </a>
                    </li>
                    <li {% if page=='financing' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.financing') }}">
            <i class="fa fa-dashboard"></i> <span>财务概要</span>
          </a>
                    </li>
                    <li {% if page=='ranking_by_point' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.ranking_by_point') }}">
            <i class="fa fa-dashboard"></i> <span>积分排行榜</span>
          </a>
                    </li>
                    <li {% if page=='ranking_by_wager' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.ranking_by_wager') }}">
            <i class="fa fa-dashboard"></i> <span>下注排行榜</span>
          </a>
                    </li>
                    <li {% if page=='agent' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.agent') }}">
            <i class="fa fa-dashboard"></i> <span>代理信息</span>
          </a>
                    </li>
                    <li {% if page=='except_grabber' %}class="active" {% endif %}>
                        <a href="{{ url_for('manager.except_grabber') }}">
            <i class="fa fa-dashboard"></i> <span>设置手动代包手</span>
          </a>
                    </li>
                </ul>
            </section>
            <!-- /.sidebar -->
        </aside>
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
        {% block page_title %}
          Dashboard
        {% endblock page_title %}
        <small>
          {% block page_title_sm %}
          {% endblock page_title_sm %}
        </small>
      </h1>
            </section>
            <!-- Main content -->
            <section class="content">
                <!-- Info boxes -->
                <div class="row" id="lte-stat-boxes">
                    <!-- /.col -->
                </div>
                <!-- /.row -->
                <!-- Main content -->
                <div class="row">
                    <div class="col-xs-12">
                        {% block content %} {% endblock content %}
                    </div>
                </div>
                <!-- /.row -->
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->
        <footer class="main-footer">
            <div class="pull-right hidden-xs">
                <b>Version</b> 0.1.0
            </div>
        </footer>
        <!-- Control Sidebar -->
        <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
        <div class="control-sidebar-bg"></div>
    </div>
    <!-- ./wrapper -->
    <!-- jQuery 3 -->
    <script src="{{ url_for('static', filename='vendor/jquery/jquery.min.js') }}"></script>
    <!--&lt;!&ndash; Bootstrap 3.3.7 &ndash;&gt;-->
    <script src="{{ url_for('static', filename='vendor/bootstrap/js/bootstrap.js') }}"></script>
    <!--&lt;!&ndash; FastClick &ndash;&gt;-->
    <script src="{{ url_for('static', filename='vendor/fastclick/js/fastclick.js') }}"></script>
    <!--&lt;!&ndash; AdminLTE App &ndash;&gt;-->
    <script src="{{ url_for('static', filename='js/adminlte.js') }}"></script>
    <!--&lt;!&ndash; Sparkline &ndash;&gt;-->
    <script src="{{ url_for('static', filename='vendor/jquery-sparkline/js/jquery.sparkline.js') }}"></script>
    <!-- jvectormap  -->
    <!--<script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>-->
    <!--<script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>-->
    <!-- SlimScroll -->
    <script src="{{ url_for('static', filename='vendor/jquery-slimscroll/js/jquery.slimscroll.js') }}"></script>
    <!-- ChartJS -->
    <!--<script src="bower_components/chart.js/Chart.js"></script>-->
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
    <!--<script src="{{ url_for('static', filename='js/pages/dashboard2.js') }}"></script>-->
    <!-- AdminLTE for demo purposes -->
    <!--<script src="dist/js/demo.js"></script>-->
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="https://cdn.bootcss.com/element-ui/2.0.5/index.js"></script>
    <script src="https://cdn.bootcss.com/element-ui/2.0.5/locale/en.min.js"></script>
    {#
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>#}
    <script src="https://cdn.bootcss.com/axios/0.17.1/axios.min.js"></script>
    <script type="text/x-template" id="box-template">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title">{{title}}</h3>
            </div>
            <div class="box-body">
                <slot name="box-body">No content specified</slot>
            </div>
            <div class="box-footer">
                test content footer
            </div>
        </div>
    </script>
    <script type="text/x-template" id="list-container">
        <table class="table with-bordered">
            <thead>
                <slot name="header"></slot>
            </thead>
            <tbody>
                <slot name="item" v-for="item in items" v-bind:item="item"></slot>
                <!--<slot name="item">no item specified</slot>-->
            </tbody>
        </table>
    </script>
    <script>
    Vue.prototype.$http = axios;
    // ELEMENT.locale(ELEMENT.lang.en)

    var formatErrorMsg = function(err) {
        var errMsg = null;
        if (err.response) {
            errMsg = '[' + err.response.status.toString() + ']-';
            var data = err.response.data.message;
            console.log(err.response.data);
            for (var attr in data) {
                errMsg += attr.toString() + ': ' + data[attr].toString() + '; '
            }
            return errMsg;
        } else {
            return err.message;
        }
    };
    //  Vue.component('lte-box', {
    //      template: '#box-template',
    //      data: function() {
    //          return {};
    //      },
    //      props: {
    //          title: String
    //      }
    //  });
    //  Vue.component('list-container', {
    //      template: '#list-container',
    //      props: {
    //          items: Array
    //      }
    //  });
    </script>
    {% block js %} {% endblock js %}
</body>

</html>